home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / src / binutils.252 / ld / scriptte / i386coff.sc < prev    next >
Encoding:
Text File  |  1994-09-07  |  989 b   |  45 lines

  1. # Linker script for 386 COFF.  This works on SVR3.2 and SCO Unix 3.2.2.
  2. # .data2 handles SCO, which uses two data sections.
  3. # Ian Taylor <ian@cygnus.com>.
  4. test -z "$ENTRY" && ENTRY=_start
  5. # These are substituted in as variables in order to get '}' in a shell
  6. # conditional expansion.
  7. INIT='.init : { *(.init) }'
  8. FINI='.fini : { *(.fini) }'
  9. cat <<EOF
  10. OUTPUT_FORMAT("${OUTPUT_FORMAT}")
  11. ${LIB_SEARCH_DIRS}
  12.  
  13. ENTRY(${ENTRY})
  14.  
  15. SECTIONS
  16. {
  17.   .text ${RELOCATING+ SIZEOF_HEADERS} : {
  18.     ${RELOCATING+ *(.init)}
  19.     *(.text)
  20.     ${RELOCATING+ *(.fini)}
  21.     ${RELOCATING+ etext  =  .};
  22.   }
  23.   .data ${RELOCATING+ 0x400000 + (. & 0xffc00fff)} : {
  24.     *(.data .data2)
  25.     ${RELOCATING+ edata  =  .};
  26.   }
  27.   .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
  28.   {                     
  29.     *(.bss)
  30.     *(COMMON)
  31.     ${RELOCATING+ end = .};
  32.   }
  33.   ${RELOCATING- ${INIT}}
  34.   ${RELOCATING- ${FINI}}
  35.   .stab  0 ${RELOCATING+(NOLOAD)} : 
  36.   {
  37.     [ .stab ]
  38.   }
  39.   .stabstr  0 ${RELOCATING+(NOLOAD)} :
  40.   {
  41.     [ .stabstr ]
  42.   }
  43. }
  44. EOF
  45.